package com.hn.zhijian.system;

import com.hn.zhijian.base.common.StatusCode;
import com.hn.zhijian.base.common.exception.ApplicationException;
import com.hn.zhijian.system.model.response.ResourceResponse;
import com.hn.zhijian.system.model.response.RoleResponse;
import com.hn.zhijian.system.model.response.UserResponse;
import org.apache.catalina.User;
import java.util.List;

/**
 * User 对象
 */
public interface IShiroUserService {
    /**
     * 通过登录名称获取
     *
     * @param loginUserName
     * @return
     */
   default UserResponse getUser(String loginUserName){
       throw new ApplicationException(StatusCode.SERVER_ERROR.getCode(),"请继承 ShiroUserService");
   }

    /**
     * 通过登录用户名称获取角色
     *
     * @param loginUserName
     * @return
     */
    default List<RoleResponse> getRole(String loginUserName){
        throw new ApplicationException(StatusCode.SERVER_ERROR.getCode(),"请继承 ShiroUserService");
    }

    /**
     * 获取角色权限
     *
     * @param loginUserName
     * @return
     */
    default List<ResourceResponse> getRoleAuthority(String loginUserName){
        throw new ApplicationException(StatusCode.SERVER_ERROR.getCode(),"请继承 ShiroUserService");
    }
}
